<?php

class ControlType
{
	const TextInput = 'TextInput';
	const Button = 'Button';
    const Tag = 'Tag';
}

class Control
{
	/**
	 * Controles do ViewState
	 *
	 * @var array
	 */
	protected $_viewstateControls = array();
	
	
	/**
	 * Div
	 *
	 * @param string $id
	 * @return ControlTag
	 */
	public static function getControlDiv($id)
	{
		$node = new ControlTag();
		$node->setAttribute("type",ControlType::Tag);
        $node->setAttribute("id",$id);
		return $node;
	}
	
	
	/**
	 * InputTextBox
	 *
	 * @param id $id
	 * @return ControlTextInput
	 */
	public static function getControlInputTextBox($id)
	{
		$node = new ControlTextInput();
        $node->setAttribute("type",ControlType::TextInput);
        $node->setAttribute("id",$id);
		return $node;
	}
    
	
	/**
	 * InputTextArea
	 *
	 * @param id $id
	 * @return ControlTextarea
	 */
	public static function getControlInputTextArea($id)
	{
		$node = new ControlTextarea();
        $node->setAttribute("type",ControlType::TextInput);
        $node->setAttribute("id",$id);
		return $node;
	}
	
	public static function getViewstateControls()
	{
		return $this->_viewstateControls;
	}
}
?>